﻿// <copyright file="PackageFileInfo.cs" company="Sinclair Community College">
// Copyright 2010 Sinclair Community College
// </copyright>
// <originalAuthor>Patrick S. Seymour (patrick.seymour@gmail.com)</originalAuthor>

namespace SinclairCC.AppV
{
    using System;

    /// <summary>
    /// This structure stores the reference of the storage block which maintains Feature Map
    /// Table type FeatureSetBlock.
    /// </summary>
    /// <remarks>
    /// This structure describes what feature block the data blocks that make up the file belong to.
    /// </remarks>
    public class PackageFileInfo
    {
        /// <summary>
        /// Index of feature set.
        /// </summary>
        private uint featureSetBlockIndex;

        /// <summary>
        /// Stores the number of storage blocks allocated for FeatureSetBlock.
        /// </summary>
        private uint featureSetBlockCount;

        /// <summary>
        /// Initializes a new instance of the PackageFileInfo class.
        /// </summary>
        public PackageFileInfo(System.IO.BinaryReader fileReader)
        {
            this.ReadContainer(fileReader);
        }

        /// <summary>
        /// Reads the actual data for this container from the file.
        /// </summary>
        protected void ReadContainer(System.IO.BinaryReader fileReader)
        {
            this.featureSetBlockIndex = fileReader.ReadUInt32();
            this.featureSetBlockCount = fileReader.ReadUInt32();
        }

        public uint FeatureSetBlockIndex
        {
            get { return this.featureSetBlockIndex; }
        }

        public uint FeatureSetBlockCount
        {
            get { return this.featureSetBlockCount; }
        }
    }
}
